package com.baizhi.controller;

import com.baizhi.annotation.LogAnnotation;
import com.baizhi.entity.CmfzRole;
import com.baizhi.service.CmfzRoleService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("cmfzRole")
public class CmfzRoleController {
    @Autowired
    private CmfzRoleService cmfzRoleService;
    @RequestMapping("select")
    @LogAnnotation(content = "查询角色信息",type = "查询")
    public Map showCmfzRole(Integer page,Integer limit){
        Map map = new HashMap();
        Page<CmfzRole> cmfzRolePage = cmfzRoleService.selectCmfzRoleByPage(page, limit);
        map.put("code",0);
        map.put("msg","");
        map.put("count",cmfzRolePage.getTotal());
        map.put("data",cmfzRolePage.getRecords());
        return map;
    }
}
